﻿using System;
using System.Collections.Specialized;
using System.Configuration.Provider;
using Telerik.Sitefinity.Social.Contracts;

namespace Telerik.Sitefinity.Social.Providers
{
    /// <summary>
    /// Base provider for the Social network provider
    /// </summary>
    public abstract class BaseSocialProvider : ProviderBase
    {
        /// <summary>
        /// Gets the name of the membership provider.
        /// </summary>
        /// <value>The name of the membership provider.</value>
        public string MembershipProviderName
        {
            get
            {
                return this.membershipProviderName;
            }
        }

        /// <summary>
        /// Initializes the provider.
        /// </summary>
        /// <param name="name">The friendly name of the provider.</param>
        /// <param name="config"><para>A collection of the name/value pairs representing the provider-specific
        ///     attributes specified in the configuration for this provider.</para></param>
        public override void Initialize(string name, NameValueCollection config)
        {
            base.Initialize(name, config);
            this.membershipProviderName = config["membershipProviderName"];
        }

        private string membershipProviderName;
    }
}
